package aop.view;

import aop.controller.UserController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Author：汤小洋
 * Date：2023-07-04 14:56
 * Description：<描述>
 */
public class UserView {

    public static void main(String[] args) {
        String username = "admin";
        String password = "123";

        ApplicationContext ac = new ClassPathXmlApplicationContext("aop/spring.xml");
        UserController userController = (UserController) ac.getBean("userController");
        userController.login(username, password);

        System.out.println("--------------------------------------");

        userController.logout();

    }
}
